import { think } from 'thinkjs';
import Redis from 'ioredis';
const isDev = think.env === 'development'

export const $redis = new Redis({
  port: 6379, // Redis port
  host: isDev ? 'r-uf6k4pigft749nfm50pd.redis.rds.aliyuncs.com' : 'r-uf6k4pigft749nfm50.redis.rds.aliyuncs.com', // Redis host
  family: 4, // 4 (IPv4) or 6 (IPv6)
  password: isDev ? 'IMchina110' : 'IMchina110'
});
